package homework19;

import java.time.LocalDate;

public class TestCompany {
    public static void main(String[] args) {
        //  Object ColaEmployee[] = new Object[10];
        ColaEmployee colaEmployee[] = new ColaEmployee[10];
        colaEmployee[0] = new SalariedEmployee("李白", LocalDate.of(1996, 1, 1), 10000);
        colaEmployee[1] = new HourlyEmployee("张飞", LocalDate.of(1997, 5, 1), 7, 100);
        colaEmployee[2] = new SalesEmployee("赵信", LocalDate.of(1994, 6, 1), 400000, 0.05);
        Company company = new Company();
//        System.out.println(colaEmployee[0].getClass());
//        System.out.println(colaEmployee[1].getClass());
//        System.out.println(colaEmployee[2].getClass());
        int month = 1;//假定现在是一月份
        try {
            for (int i = 0; i < colaEmployee.length; i++)
                company.wages(colaEmployee[i], month);
        }
        catch (Exception e) {
        }



    }
}
